<div id="ourservices" class="inner-tabs-panel">
    <div class="inner-content">
        <div class="panel">

            <div class="panel-heading">
                <div class="panel-title">
                    Services <code class="help">Slug : #services</code>
                </div>

        <!--         <div class="panel-options">
                    <a class="bg" href="#"><i class="fa fa-cog"></i></a>
                    <a href="#"><i class="fa fa-angle-down"></i></a>
                    <a href="#"><i class="fa fa-refresh"></i></a>
                    <a href="#"><i class="fa fa-times"></i></a>
                </div> -->
            </div>

            <div class="panel-body wo-flag">
                 <div class="form-group">
                    <div class="slider" >
                        <input type="checkbox" id="enable-services" class="toggle-settings" name="theme_options[ourservices][enable]" value="1" <?php echo  (isset($aOurServices['enable']) && !empty ($aOurServices['enable']) ) ? 'checked' : ''; ?>>
                        <label for="enable-services">Enable Our Services</label>
                    </div>
                </div>
            </div>

            <div class="panel-body">
                <h4>Paralax</h4>
                <div class="form-group">
                    <?php $serviceParallax = isset($aOurServices['parallax']) && !empty($aOurServices['parallax']) ? $aOurServices['parallax'] : WO_ADMIN_IMG  . 'no-img.jpg'; ?>
                    <div class="image-wrap">
                        <span><img src="<?php echo $serviceParallax; ?>" width="350"></span>
                    </div>
                    <br>
                    <a class="btn btn-white upload-img" data-insertlink=".wo-insert-link" data-append=".image-wrap">Get image</a>
                    <input class="insertlink" type="hidden" value="<?php echo  isset($aOurServices['parallax']) ? $aOurServices['parallax'] : ""; ?>" name="theme_options[ourservices][parallax]">
                </div>
            </div>

            <div class="panel-body">
                <div class="form-group">
                    <label class="form-label">Title</label>
                    <div class="controls">
                        <input type="text" class="form-control" name="theme_options[ourservices][title]" value="<?php  echo isset($aOurServices['title']) ? stripslashes($aOurServices['title']) : ''; ?>">
                    </div>
                </div>

                <div class="form-group">
                    <label class="form-label">Short Description</label>
                    <div class="controls">
                        <input type="text" class="form-control" name="theme_options[ourservices][short_description]" value="<?php  echo isset($aOurServices['short_description']) ? stripslashes($aOurServices['short_description']) : ''; ?>">
                    </div>
                </div>

                <div class="form-group">
                    <label class="form-label">Description</label>
                    <div class="controls">
                        <textarea type="text" class="form-control" name="theme_options[ourservices][description]"><?php  echo isset($aOurServices['description']) ? stripslashes($aOurServices['description']) : ''; ?></textarea>
                    </div>
                </div>

            </div> <!--/end section1 of ourservices -->

            <div class="panel-body">
               
                <div class="form-group">
                    <label class="form-label">Choose your service</label>
                    <div class="controls">
                        <?php
                        $aPostMetaServices = $this->wo_get_custom_post_content('qva_ourservice');

                        if ( empty($aPostMetaServices) )
                        {
                            ?>

                            <p>You haven't had any post yet.
                                <a  class="help" href="<?php echo admin_url('edit.php'); ?>?post_type=qva_ourservice">Create some</a>
                            </p>

                        <?php
                        }else
                        {
                        ?>
                        <select name="theme_options[ourservices][content]" id="">
                            <?php
                            foreach ( $aPostMetaServices as $k => $postService ) : setup_postdata($postService);
                                if (isset($aOurServices['content']) && !empty($aOurServices['content']) && $aOurServices['content'] == $postService->ID )
                                {
                                    $selected = 'selected';
                                }else{
                                    if ($k == 0)
                                    {
                                        $selected = 'selected';
                                    }else{
                                        $selected = '';
                                    }
                                }
                                ?>
                                <option value="<?php echo $postService->ID; ?>" <?php echo $selected ?> ><?php echo $postService->post_title; ?></option>
                            <?php
                            $selected="";
                            endforeach;wp_reset_postdata();
                           
                            ?>
                        </select>
                        <?php  } ?>
                    </div>
                </div>
            </div> <!--/end the section-2 of ourservices-->

        </div><!-- END Panel -->
    </div>         
</div>